<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let score = 750

    // 1. 单分支
    // if (score > 700) {
    //   console.log('恭喜，考入黑马程序员')
    // }

    // 2. 双分支
    if (score > 700) {
      console.log('恭喜，考入黑马程序员')
    } else {
      console.log('别气馁，再接再厉！')
    }

    // 3. 多分支
    if (score > 700) {
      console.log('非常优秀')
    } else if (score > 500) {
      console.log('优秀')
    } else {
      console.log('继续加油')
    }


    let fruit = '橘子'

    switch (fruit) {
      case '苹果':
        console.log('苹果5元/斤')
        break
      case '橘子':
        console.log('橘子3元/斤')
        break
      default:
        console.log('不好意思，您查询的水果已售罄')
    }


    let num1 = 10
    let num2 = 20

    let res = num1 > num2 ? num1 : num2

    console.log(res)
  </script>
</body>

</html>